package com.pxr.shuzu;

public class Array {
    public static void main(String[] args) {
        test31();
    }

    public static void test31() {
        //声明一维数组
        int[] arr;
        //初始化一维数组
        int[] arr1 = new int[5];
        int[] arr2 = new int[]{1,2,3,4};
        int[] arr3 = {1,2,3,4,5};
        //遍历数组
        for (int i=0;i<arr2.length;i++) {
            System.out.print(" "+arr2[i]);
        }
        System.out.println();
        System.out.println("==============");
        for (int array:arr2) {
            System.out.print(array);
        }
    }
}
